package db;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class database {
	public static void main() throws Exception {
		try {
			String connectionURL = "jdbc:mysql://localhost:3306/offer";
			Connection connection = null;
			Class.forName("com.mysql.jdbc.Driver").newInstance();
			connection = DriverManager.getConnection(connectionURL, "root", "root");
			
			
		    ResultSet rs= null;
		    Statement statement=null;
		    
		    
		    statement = connection.createStatement();
		    rs = statement.executeQuery("SELECT * FROM offer");
		    
		    System.out.print(rs);	
			
			
			

		} catch (SQLException e) {
			throw e;
		} catch (Exception e) {
			throw e;
		}
	}
	
	
	
	
}